package com.xyazm.risk.service.impl;

import com.xyazm.common.logger.LoggerFormat;
import com.xyazm.risk.domain.dto.CheckOrderRiskDTO;
import com.xyazm.risk.domain.param.CheckOrderRiskParam;
import com.xyazm.risk.service.IRiskService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;


@Slf4j
@Service
public class RiskServiceImpl implements IRiskService {

    @Override
    public CheckOrderRiskDTO checkOrderRisk(CheckOrderRiskParam param) {

        log.info(LoggerFormat.build()
                .remark("checkOrderRisk->request")
                .data("request", param)
                .finish());

        // 默认风控检查通过
        CheckOrderRiskDTO checkOrderRiskDTO = new CheckOrderRiskDTO();
        checkOrderRiskDTO.setResult(true);

        log.info(LoggerFormat.build()
                .remark("checkOrderRisk->response")
                .data("response", checkOrderRiskDTO)
                .finish());
        return checkOrderRiskDTO;
    }

}
